<?php

echo '<H3>Data Inventori Konsumsi<H3>';
$this->widget('zii.widgets.grid.CGridView', array(
    'id' => 'contentinventori-grid',
	'dataProvider'=>$inventori->search(),
//	'filter' => $inventori,
    'columns'=>array(
		array(
		
			'header' => 'ID Tipe',
			'name' => type_id,
			'filter' => false		
		
		),
		array(
			'header' => "Tipe Makanan",		
			'value' => '$data->type->name',
	   //'filter' => CHtml::activeDropDownList($model_rapat,'typeMakanan',$typeMakanan),
		//	'filter'=> false,
			//'htmlOptions' => array('style'=>'width:130px;'),
		
		),
		array(
			'header' => "Jumlah di Gudang",		
			'name' => 'quantity',
	   //'filter' => CHtml::activeDropDownList($model_rapat,'typeMakanan',$typeMakanan),
		//	'filter'=> false,
			//'htmlOptions' => array('style'=>'width:130px;'),
		
		),
		
		array(
			'header'=> 'Jumlah Diperlukan',
		//	'value' => count(RequestKonsumen::model()->findAllBySql("SELECT `quantity` FROM `makanan_konsumen`,`request_konsumen` WHERE `type_id` = :tipe  AND `request_konsumen`.`id`=`makanan_konsumen`.`request_id` AND `request_konsumen`.`status`= 2",
			//			array(':tipe'=>($data->type_id)
				//		))),
			'value' => '$data->getJumlahDiperlukan()',	
		)
	

    ),
));

?>